package com.ruoyi.system.service.impl;

import com.ruoyi.common.core.text.Convert;
import com.ruoyi.system.domain.JiajiaTousuConfig;
import com.ruoyi.system.mapper.JiajiaTousuConfigMapper;
import com.ruoyi.system.service.IJiajiaTousuConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 投诉举报原因Service业务层处理
 * 
 * @author knd
 * @date 2021-11-04
 */
@Service
public class JiajiaTousuConfigServiceImpl implements IJiajiaTousuConfigService
{
    @Autowired
    private JiajiaTousuConfigMapper jiajiaTousuConfigMapper;

    /**
     * 查询投诉举报原因
     * 
     * @param id 投诉举报原因主键
     * @return 投诉举报原因
     */
    @Override
    public JiajiaTousuConfig selectJiajiaTousuConfigById(Long id)
    {
        return jiajiaTousuConfigMapper.selectJiajiaTousuConfigById(id);
    }

    /**
     * 查询投诉举报原因列表
     * 
     * @param jiajiaTousuConfig 投诉举报原因
     * @return 投诉举报原因
     */
    @Override
    public List<JiajiaTousuConfig> selectJiajiaTousuConfigList(JiajiaTousuConfig jiajiaTousuConfig)
    {
        return jiajiaTousuConfigMapper.selectJiajiaTousuConfigList(jiajiaTousuConfig);
    }

    /**
     * 新增投诉举报原因
     * 
     * @param jiajiaTousuConfig 投诉举报原因
     * @return 结果
     */
    @Override
    public int insertJiajiaTousuConfig(JiajiaTousuConfig jiajiaTousuConfig)
    {
        return jiajiaTousuConfigMapper.insertJiajiaTousuConfig(jiajiaTousuConfig);
    }

    /**
     * 修改投诉举报原因
     * 
     * @param jiajiaTousuConfig 投诉举报原因
     * @return 结果
     */
    @Override
    public int updateJiajiaTousuConfig(JiajiaTousuConfig jiajiaTousuConfig)
    {
        return jiajiaTousuConfigMapper.updateJiajiaTousuConfig(jiajiaTousuConfig);
    }

    /**
     * 批量删除投诉举报原因
     * 
     * @param ids 需要删除的投诉举报原因主键
     * @return 结果
     */
    @Override
    public int deleteJiajiaTousuConfigByIds(String ids)
    {
        return jiajiaTousuConfigMapper.deleteJiajiaTousuConfigByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除投诉举报原因信息
     * 
     * @param id 投诉举报原因主键
     * @return 结果
     */
    @Override
    public int deleteJiajiaTousuConfigById(Long id)
    {
        return jiajiaTousuConfigMapper.deleteJiajiaTousuConfigById(id);
    }
}
